package org.mall.modules.shop.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.mall.modules.pojo.shop.ShopDTO;
import org.mall.modules.pojo.shop.ShopDetailDTO;
import org.mall.modules.pojo.shop.ShopPageBO;
import org.mall.modules.shop.entity.Shop;
import org.mall.modules.shop.entity.ShopClerkRelationShip;
import org.mall.modules.shop.entity.ShopSellerRe;

import java.util.List;

/**
 * @Description: 商铺
 * @Author: jeecg-boot
 * @Date:   2019-10-23
 * @Version: V1.0
 */
public interface IShopService extends IService<Shop> {


    /**
     * 保存商户商铺关联关系
     * @param shopId
     * @param sellerId
     */
    int saveRelationshipTable(String shopId, String sellerId);

    /**
     * 逻辑删除商铺
     * @param id
     */
    void removeShopById(String id);

    /**
     * 批量逻辑删除商铺
     * @param asList
     */
    int removeShopByIds(List<String> asList);

    void deleteAllRelationShip(String clerkId);

    List<ShopPageBO> getAllShopListOfSeller(Page page, String sellerId);

    ShopSellerRe getShopSellerShipByShopId(String id);

    void deleteSellerShopRelationByShopId(String shopId);

    boolean addSellerShopRelationShip(String id, String id1);

    List<ShopDTO> queryClerkBelongShops(String clerkId);

    List<ShopDTO> getListOfStores(String userId);
    /**
     * 保存商品id与条目id到关系表中
     * @param
     */
    void saveCategoryAndSpuId(long spuId, String categoryId, String shopId);
    /**
     * 删除商品id与条目id的关系1
     * @param spuId
     */
    void deleteCategoryAndSpuId(long spuId);
    /**
     * 批量删除商品id与条目id的关系
     * @param spuIds
     */
    void deleteCategoryAndSpuIds(List<String> spuIds);


    ShopClerkRelationShip getShopSellerShipBySellerIdAndShopId(String userId, String shopId);
    /**
     * 通过店铺id获取店铺的信息
     * @param shopIds
     * @return
     */
    List<ShopDTO> getById(List<String> shopIds);

    IPage<Shop> getListByCoordinate(Page page, String co);

    Boolean updateShopStatus(String shopId, Integer status);

    Boolean updateStatus(String shopId, Integer status);

    List<ShopDetailDTO> getShopLisBySellerId(String userId);

    Boolean addShopIncome(String shopId, Integer income);

    List<ShopDTO> getByClerkIds(List<String> clerkIds);

    List<ShopPageBO> getShopPageListOfClerk(Page setSize, String userIdByToken);

    Shop getDetailById(String shopId);

    Integer getAllShopCount();

    List<Shop> getAllYearAllShop(String timeStart, String timeEnt);

    List<Shop> getShopNameList( String shopName);
}
